package com.snake.springboot.custom.api.model.fileoss;


import com.snake.springboot.custom.api.model.common.KeyVal;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>OSS类型
 * 类{@code OSSType} </br>
 * 创建时间2025/5/8 16:08
 * @author yangxt
 * @see
 */
public enum OSSType {
    /**阿里云OSS*/
    ALI_OSS("aliOss","阿里云OSS"),
    /**本地OSS*/
    LOCAL_OSS("localOss","本地OSS");

    private String code;
        private String name;

    OSSType(String code, String name) {
        this.code = code;
        this.name = name;
    }


    public static List<KeyVal<String,String>> getEnumList(){
        List<KeyVal<String,String>>  kv=new ArrayList<>(4);
        OSSType[] values = OSSType.values();
        for (OSSType typeEnum:values) {
            kv.add(new KeyVal<>(typeEnum.getCode(),typeEnum.getName()));
        }
        return kv;
    }


    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
